# REPLICATION ARCHIVE

This replication archive contains all scripts and data necessary to replicate the analysis in "Working Hard or Hardly Working? Gender and Voter Evaluations of Legislator Productivity".

## SCRIPTS

In order to re-run the models and analysis described in the paper, you will need to execute the following files (in this order):

- 01_prep_data.R

	- Restructures the raw data from YouGov, creates key outcome and independent variables 

- 02a_analysis_paper.R

	- Creates various outputs for all plots included in the main paper 

- 02b_conditional_mp_gender.R

	- Creates various outputs for all plots included in the appendix 

## DATA

- experiment_results.csv # Raw data from YouGov
- yougov_codebook.xlsx # Codebook provided by YouGov
- productivity.Rdata # Cleaned experimental data for analysis 


## MISC

We also include a directory of intermediate outputs from the scripts listed above:

- plots/
	- figure_2_amce.pdf # Figure 2 from the manuscript 
	- figure_3_unconditional_evaluations.pdf # Figure 3 from the manuscript 
	- figure_4_conditional_continuous.pdf # Figure 4 from the manuscript 
	- figure_5_conditional_binary.pdf # Figure 5 from the manuscript 
	- figure_6_party_congruence.pdf # Figure 6 from the manuscript 
	- figure_S1_amce_male_female.pdf # Figure S1 from the supplementary materials 
	- figure_S2_interactions_male_female_pairings.pdf # Figure S2 from the supplementary materials 
	- figure_S3_mm_gender_congruence.pdf # Figure S3 from the supplementary materials 
        - figure_S4_mm_gender.pdf # Figure S4 from the supplementary materials 
        - figure_S5_gender_congruence.pdf # Figure S5 from the supplementary materials 
        - figure_S6_hte_gender.pdf # Figure S6 from the supplementary materials 
- tables/
	- unconditional.Rdata # Estimates models for tables S1
	- conditional_mp_gender.Rdata # Estimated models for tables S2-23
	- unconditional_pooled.Rdata # Estimated models for tables S4-S5
	- conditional_nonlinear.Rdata # Estimated models for tables S6-S8
The final objects in this archive are:

- figure_1_prompt.jpg - # Screenshot of the experimental prompt presented to YouGov panel 

## SOFTWARE

- R # v4.1.2
- RStudio # vRStudio 2021.09.2+382
- data.table # v1.14.2
- plyr # v1.8.6 
- dplyr # v1.0.9
- tidyverse # v1.3.1
- ggplot2 # v3.3.6 
- broom # v0.7.11
- patchwork # v1.1.1
- estimatr # v0.30.6
- margins # v0.3.26
- cjoint # v2.1.0
- cregg # v0.4.0
